import request from '@/utils/request'
//查询
export const vegetableinfoGetService = () => {
  return request.get('adminvegetableplot/search')
}

//添加用户信息
export const vegetableinfoAddService = ({
  id,
  name,
  crops,
  fertilizationcycle,
  fertilizer,
  landparcelid,
  starttime,
  endtime,
  growthcondition,
  status,
  landresourcename,
  order,
  oldendtime
}) => {
  return request.post('adminvegetableplot/add', {
    id,
    name,
    crops,
    fertilizationcycle,
    fertilizer,
    landparcelid,
    starttime,
    endtime,
    growthcondition,
    status,
    landresourcename,
    order,
    oldendtime
  })
}
//更新用户信息
export const vegetableinfoUpService = ({
  id,
  name,
  crops,
  fertilizationcycle,
  fertilizer,
  landparcelid,
  starttime,
  endtime,
  growthcondition,
  status,
  landresourcename,
  order,
  oldendtime
}) => {
  return request.put('adminvegetableplot/up', {
    id,
    name,
    crops,
    fertilizationcycle,
    fertilizer,
    landparcelid,
    starttime,
    endtime,
    growthcondition,
    status,
    landresourcename,
    order,
    oldendtime
  })
}
//删除
export const vegetableplotinfoDlService = (id, landparcelid, status) => {
  return request.delete('adminvegetableplot/delete', {
    params: { id, landparcelid, status }
  })
}
